home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / Apps / ScreenSavers / BackSpaceViews / StarShipView.BackModule / StarShipProtocol.h < prev    next >
Encoding:
Text File  |  1995-06-12  |  1.6 KB  |  47 lines

  1. #import <appkit/appkit.h>
  2. typedef struct {
  3.     NXRect avoid;    
  4.     } AvoidStruct;
  5.  
  6. @protocol StarShipProtocol
  7.  
  8. // methods in bodyController object that must be implemented
  9.  
  10. - setStarsOutlet:(id)starsOutlet;  //StarShipView passes id of NewSpaceView
  11.                                    //to the SpaceController object
  12.                                    //so you can control stars
  13. - setBoundsRect: (NXRect *)r;
  14. - (BOOL)doUntilDone;  //just like one step - returns YES if module is
  15.                       //ready to give up control
  16. - setStartInterval: (Slider *)sender;
  17. - setObjectSpeed: (Slider *)sender;
  18. - setStarSpeed:(Slider *)sender;        //in case you want to override
  19. - (int)setCycleValue:(int)value;
  20. - freeResources;    // freeing resources before doing next module
  21. - setFirstState;    // for doing init for each module
  22. - windowSizeChanged;    //tells object that window resized
  23. - starsStopped;            // space object tells you when stars are stopped
  24.                         //if you sent it a stopStars message
  25. - setPwrDownSnd:(Sound *)theSound;
  26. - setPwrUpSnd:(Sound *)theSound;
  27. - setSoundEnabled:(BOOL)enabled;    //tells module that sound state changed
  28.                         
  29.                         
  30.                         
  31.                         
  32.                         
  33. // methods the body object has to know about that
  34. //the NewSpaceView implements
  35.  
  36. - (BOOL)isStopped;        //asks the stars object if they are now stopped
  37. - (BOOL)isStopping;        //asks the stars object if they are stopping
  38. - startStars;            //tells the stars object to start the stars
  39. - setStarsStopped;        //tells the stars object to stop the stars instantly
  40. - stopStars;            //tells the stars object to stop the stars slowly
  41. - hideStars;            //turns off displaying stars from stars object
  42. - setAvoidRect:(Storage *)storage;  //tells the stars object to avoid
  43.                                     //drawings stars here
  44.  
  45. @end
  46.  
  47.